import java.util.Scanner;

public class a042_平面圓形切割 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int circles;
		int result; // f(n) = n^2 - n + 2
		
		while(sc.hasNext()) {
			circles = sc.nextInt();
			
			result = (int)Math.pow(circles, 2) - circles + 2;
			
			System.out.println(Integer.toString(result));
		}
	}
	
}